package com.java.basis.string;


import org.apache.commons.lang.StringUtils;

/**
 * @author wangning
 * @create 2021-08-10 9:57
 */
public class TestString03 {
	public static void main(String[] args) {
		System.out.println("----------------------Apache Commons Lang----------------------");
		System.out.println("------------------------------------------------------------");
		System.out.println("StringUtils.isBlank(null) = " + StringUtils.isBlank(null));//true
		System.out.println("StringUtils.isBlank(\"\") = " + StringUtils.isBlank(""));//true
		System.out.println("StringUtils.isBlank(\" \") = " + StringUtils.isBlank(" "));//true
		System.out.println("StringUtils.isBlank(\"   \") = " + StringUtils.isBlank("   "));//true

		System.out.println("------------------------------------------------------------");
		System.out.println("StringUtils.isEmpty(null) = " + StringUtils.isEmpty(null));//true
		System.out.println("StringUtils.isEmpty(\"\") = " + StringUtils.isEmpty(""));//true
		System.out.println("StringUtils.isEmpty(\" \") = " + StringUtils.isEmpty(" "));//false
		System.out.println("StringUtils.isEmpty(\"   \") = " + StringUtils.isEmpty("   "));//false

		System.out.println("------------------------org.springframework.util-------------------------");
		System.out.println("org.springframework.util.StringUtils.isEmpty(null) = " + org.springframework.util.StringUtils.isEmpty(null));//true
		System.out.println("org.springframework.util.StringUtils.isEmpty(\"\") = " + org.springframework.util.StringUtils.isEmpty(""));//true
		System.out.println("org.springframework.util.StringUtils.isEmpty(\" \") = " + org.springframework.util.StringUtils.isEmpty(" "));//false
		System.out.println("org.springframework.util.StringUtils.isEmpty(\"  \") = " + org.springframework.util.StringUtils.isEmpty("  "));//false


	}
}

